scaled_sum <- read.csv("scaled_sum.csv")
hhs_all_complete <- read_csv("hhs_all_complete.csv")
## New names:
## * `` -> ...1
## Rows: 19745 Columns: 237
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (81): submissionid, 44_meeting_attendance, 45_leadership_position, 48_...
## dbl (155): ...1, level4_id, lat, lon, ma_area, 9_region_member, 10_mpa_impo...
## dttm (1): updatedat
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
scaled_km_df <- read_csv("scaled_km_df.csv")
## New names:
## * `` -> ...1
## Rows: 4451 Columns: 130
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (37): submissionid, country, level1_name, level2_name, level4_name, ma_n...
## dbl (93): ...1, x1, level4_id, lat, lon, ma_area, x9_region_member, x44_meet...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
We want to include a point where all responses are “neutral” on our map of compliance behaviors
neutral_point <- scaled_sum %>%
filter(country == "NEUTRAL")
We now have one (x,y) point for each fisher observation, and can map them onto an X-Y plane of Agreement and Engagement.
ggplot(data = scaled_sum,
aes(x = agree_mean, y = eng_mean)) +
geom_point(color = "darkblue", size = 0.7, alpha = 0.4) +
geom_point(data = neutral_point, aes(x = agree_mean, y = eng_mean),
size = 8, color = "pink2") +
labs( x = "Agreement (Scaled across 5 Questions)",
y = "Engagement (Scaled across 5 Questions)",
title = "Engagement and Agreement Index Mapping") +
# scale_color_viridis(discrete = TRUE, option = "D") +
# scale_x_continuous(limits = c(-3, 1.7),
# breaks = c(-2, -1, 0, 1, 1.5)) +
# scale_y_continuous(limits = c(-1.5, 1.5),
# breaks = c( -1, 0, 1, 1.5)) +
guides(colour = guide_legend(override.aes = list(size=7))) +
theme_bw()
*Figure 1: A plot with the **neutral* fisher reported within the spread of our Z-score-based indices. We see that Ms. Neutral is 1 SD below the mean in agreement. This location means that the majority of fishers at least somewhat agree with rules in place. Meanwhile, we see dense grouping between -0.5 and 0.5 on both axes. Quite a few fishers have the maximum score for agreement, while a smaller number meet the ceiling of engagement.
Between Cluster 1 and 4 (our “average” fishers,) we see that C4 is a full sd higher on question 43 “Do you think there is any benefit to regulating fishing via a managed access area and a reserve area?”
Both C1 and C4 (average fishers) have higher values in question x61g (willingness to change fishing behavior for the sake of conservation,) and they slightly disagree with “encouraging others to follow regulations.”
Average fishers aren’t engaging much (including meeting attendance.) From an NGO perspective, if one wants to shift fisher behavior+attitudes, then try and bring the reluctant folks into the governance process.
counts_63 <- scaled_sum %>%
count(x63_fishing_in_reserve, country)
filtered_63 <- scaled_sum %>%
filter(x63_fishing_in_reserve == "1")
ggplot(data = filtered_63,
aes(x = agree_mean, y = eng_mean)) +
geom_point(color = "darkblue", size = 1.2, alpha = 1,
show.legend = TRUE) +
labs( x = "Agreement (Scaled across 5 Questions)",
y = "Engagement (Scaled across 5 Questions)",
title = "Engange and Agreement of Admitted rule-breakers") +
scale_x_continuous(limits = c(-3, 2),
breaks = c(-2, -1, 0, 1, 2)) +
scale_y_continuous(limits = c(-1.5, 2),
breaks = c( -1, 0, 1, 2)) +
theme_bw()
Figure 4: A graph of Agreement and Engagement measures, colored by responses of “Do you fish inside the reserve?” These fishers range
Question 63 asks if fishers break the rules, and fish in the reserve. This would be a classic measure of compliance (although self-reporting likely leads to a lower N of admitted non-compliers)
138 fishers admitted that they fish in the reserve, while 2800 said they do not. The question we’re left with is: What is different about folks who admit to breaking rules? These “Yes” rule-breakers are spread relatively evenly across all countries. Maybe they don’t think there are sanctions, their community doesn’t care about it
I’ll do the same “rule-breaker” analysis, but against the question, “Out of 10 people in your community, how many people…Fished in the reserve in the last month”
Here, I’ve attached the summary statistics of the Clusters. We ahve them on hand for tables, individual stats, Chi-Squared tests, etc.
cluster_summary_df <- scaled_km_df %>%
group_by(cluster_no) %>%
summarise(eng_mean = mean(eng_mean),
agree_mean = mean(agree_mean),
x44_mean = mean(x44_meeting_attendance),
x45_mean = mean(x45_leadership_position),
x48_mean = mean(x48_enforcement_participation),
x53_mean = mean(x53_encourage_regulations),
x61g_mean = mean(x61g_fishing_change_behavior),
x43_mean = mean(x43_ma_benefits),
x46_mean = mean(x46_represent_interests),
x52_mean = mean(x52_ma_benefit_5yrs),
x61a_mean = mean(x61a_current_regulations),
x61f_mean = mean(x61f_rights_distribution_fair),
x30a_mean = mean(x30_trust_local_decision),
x44_median = median(x44_meeting_attendance),
x45_median = median(x45_leadership_position),
x48_median = median(x48_enforcement_participation),
x53_median = median(x53_encourage_regulations),
x61g_median = median(x61g_fishing_change_behavior),
x43_median = median(x43_ma_benefits),
x46_median = median(x46_represent_interests),
x52_median = median(x52_ma_benefit_5yrs),
x61a_median = median(x61a_current_regulations),
x61f_median = median(x61f_rights_distribution_fair),
x30a_median = median(x30_trust_local_decision)) %>%
mutate(across(where(is.numeric), ~ round(., 2)))
## Here, the last line of code rounds to the second decimal
cluster_medians <- cluster_summary_df %>%
select(1, 14:23)
cl_mean_graphable_df <- cluster_summary_df %>%
select(eng_mean, agree_mean, cluster_no)
scaled_cluster_counts <- scaled_km_df %>%
count(cluster_no)
ggplot() +
geom_point(data = scaled_km_df,
aes(x = agree_mean, y = eng_mean,
color = cluster_no),
size = 0.7, alpha = 0.7) +
geom_point(data = cl_mean_graphable_df,
aes(x = agree_mean, y = eng_mean,
color = cluster_no),
size = 6, shape = "triangle", show.legend = FALSE) +
labs( x = "Agreement (Scaled across 5 Questions)",
y = "Engagement (Scaled across 5 Questions)",
title = "Mapping Clusters",
color = "Cluster") +
scale_x_continuous(limits = c(-3, 2),
breaks = c(-2, -1, 0, 1, 2)) +
scale_y_continuous(limits = c(-1.5, 2),
breaks = c( -1, 0, 1, 2)) +
guides(colour = guide_legend(override.aes = list(size=7)))
## Warning: Removed 10 rows containing missing values (geom_point).
The 4 Clusters, done marked by color. Means are marked by triangles.
Between Cluster 1 and 4 (our “average” fishers,) we see that C4 is a full sd higher on question 43 “Do you think there is any benefit to regulating fishing via a managed access area and a reserve area?”
Both C1 and C4 (average fishers) have higher values in question x61g (willingness to change fishing behavior for the sake of conservation,) and they slightly disagree with “encouraging others to follow regulations.”
Average fishers aren’t engaging much (including meeting attendance.) From an NGO perspective, if one wants to shift fisher behavior+attitudes, then try and bring the reluctant folks into the governance process.
kmeans_kable <- head(cluster_summary_df) %>%
kable( format = "html", caption = "Summary of Clusters") %>%
kable_styling(bootstrap_options = "striped",
full_width = F,
position = "left") %>%
collapse_rows(columns = 3, valign = "middle")
kmeans_kable
| cluster_no | eng_mean | agree_mean | x44_mean | x45_mean | x48_mean | x53_mean | x61g_mean | x43_mean | x46_mean | x52_mean | x61a_mean | x61f_mean | x30a_mean | x44_median | x45_median | x48_median | x53_median | x61g_median | x43_median | x46_median | x52_median | x61a_median | x61f_median | x30a_median |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Committed | 0.87 | 0.30 | 0.89 | 0.52 | 0.50 | 0.66 | 4.19 | 0.65 | 0.89 | 0.72 | 4.06 | 4.10 | 4.10 | 1 | 1 | 1 | 1 | 4 | 1 | 1 | 1 | 4 | 4 | 4 |
| Resistant | -0.42 | -0.87 | -0.47 | -0.65 | -0.74 | -0.45 | 3.38 | 0.46 | 0.01 | 0.19 | 2.76 | 2.80 | 2.74 | -1 | -1 | -1 | 0 | 4 | 0 | 0 | 0 | 3 | 3 | 3 |
| Supportive | -0.18 | 0.31 | -0.06 | -0.81 | -0.86 | -0.15 | 4.07 | 1.00 | 0.76 | 0.66 | 4.10 | 3.95 | 3.90 | -1 | -1 | -1 | 0 | 4 | 1 | 1 | 1 | 4 | 4 | 4 |
| Wavering | -0.24 | -0.13 | -0.19 | -0.86 | -0.87 | -0.18 | 4.03 | 0.00 | 0.70 | 0.30 | 4.13 | 3.87 | 4.04 | -1 | -1 | -1 | 0 | 4 | 0 | 1 | 0 | 4 | 4 | 4 |
no_na_19 <- scaled_km_df %>%
drop_na(x19_current_fish_catch) %>%
mutate(x19_current_fish_catch = recode_factor(x19_current_fish_catch,
"Declined a lot" = "1. Declined a lot",
"Declined slightly" = "2. Declined slightly",
"Stayed the same" = "3. Stayed the same",
"Improved slightly" = "4. Improved slightly",
"Improved heavily" = "5. Improved heavily"))
mean_19_df <- no_na_19 %>%
group_by(x19_current_fish_catch) %>%
summarise(eng_mean = mean(eng_mean),
agree_mean = mean(agree_mean))
Another Version of Perceived Catch
ggplot(no_na_19,
aes(x = agree_mean, y = eng_mean, color = x19_current_fish_catch)) +
geom_point(size = 0.7) +
labs( x = "Agreement (Scaled across 5 Questions)",
y = "Engagement (Scaled across 5 Questions)",
title = "Perceived Change in Catch",
color = "Change in Fish Catch (perceived)",
caption = "Hypothesis: fish decline = Less Agreeing") +
scale_x_continuous(limits = c(-3, 2),
breaks = c(-2, -1, 0, 1, 2)) +
scale_y_continuous(limits = c(-1.5, 2),
breaks = c( -1, 0, 1, 2)) +
guides(colour = guide_legend(override.aes = list(size=7)))
## Warning: Removed 10 rows containing missing values (geom_point).
x19_counts <- no_na_19 %>%
count(x19_current_fish_catch)
x19_cluster_counts <- no_na_19 %>%
group_by(cluster_no) %>%
count(x19_current_fish_catch)
ggplot(x19_cluster_counts,
aes(x = x19_current_fish_catch, y = n, fill = cluster_no,
)) +
geom_bar(position="fill", stat="identity") +
labs( x = "Perception of Fish Stock (over last 2 years)",
y = "Percentage",
fill = "Cluster") +
guides(colour = guide_legend(override.aes = list(size=7))) +
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust=1))
reversed_x19_counts <-
no_na_19 %>%
group_by(x19_current_fish_catch) %>%
count(cluster_no)
ggplot(reversed_x19_counts,
aes(x = cluster_no, y = n, fill = x19_current_fish_catch)) +
geom_bar(position="fill", stat="identity", alpha = 0.7) +
labs( x = "Clusters",
y = "Percentage of Cluster",
title = "Perceived Catch and Clusters",
fill = "Perceived Change in Fish Catch \n (compared with 2 years prior)") +
scale_fill_viridis(discrete = T) +
theme_bw()
Here’s a breakdown of the ecology question:
Cluster 1 saw mostly declines (466/677) Cluster 2 has the most who saw slight improvements Cluster 3
I just want to check the counts of x19 by country
x19_by_country <- no_na_19 %>%
group_by(country) %>%
count(x19_current_fish_catch)
ggplot(x19_by_country) +
geom_bar( aes(x = country, y=n, fill = x19_current_fish_catch), stat="identity", alpha=0.8) +
theme_bw() +
labs(fill = "Perceived Fish Catch")
x19_sans_phl <- no_na_19 %>%
filter(country != "PHL") %>%
group_by(country) %>%
count(x19_current_fish_catch)
ggplot(x19_sans_phl) +
geom_bar( aes(x = country, y=n, fill = x19_current_fish_catch), stat="identity", alpha=0.8) +
theme_bw() +
labs(fill = "Perceived Fish Catch")
First, I clean the dataframe
fishing_effort_17 <- scaled_km_df %>%
filter(x17_fishing_low_profit %in% c("Once or never",
"A few times",
"A few times per month",
"1-2 per week",
"More than 1-2 times per week",
na.rm = FALSE)) %>%
drop_na(x17_fishing_low_profit) %>%
mutate(x17_fishing_low_profit = recode_factor(x17_fishing_low_profit, "Once or never" = "Rarely")) %>%
mutate(x17_fishing_low_profit = recode_factor(x17_fishing_low_profit, "A few times" = "Rarely"))
x17_counts <- fishing_effort_17 %>%
group_by(x17_fishing_low_profit) %>%
count()
x17_cluster_counts <- fishing_effort_17 %>%
group_by(cluster_no) %>%
count(x17_fishing_low_profit)
Then I visualize
ggplot(data = fishing_effort_17, aes(x = agree_mean, y = eng_mean)) +
geom_point(aes(color = x17_fishing_low_profit), size = 0.7, alpha = 0.7) +
labs( x = "Agreement (Scaled across 5 Questions)",
y = "Engagement (Scaled across 5 Questions)",
title = "Engagement and Agreement Index Mapping") +
# scale_color_viridis(discrete = TRUE, option = "D") +
# scale_x_continuous(limits = c(-3, 1.7),
# breaks = c(-2, -1, 0, 1, 1.5)) +
# scale_y_continuous(limits = c(-1.5, 1.5),
# breaks = c( -1, 0, 1, 1.5)) +
guides(colour = guide_legend(override.aes = list(size=7))) +
theme_bw()
ggplot(x17_cluster_counts,
aes(x = cluster_no, y = n, fill = x17_fishing_low_profit)) +
geom_bar(position="dodge", stat="identity", alpha = 0.8) +
labs( x = "Clusters (1 and 4 are 'average')",
y = "Total # of Fishers",
title = "Fishing Effort in Offseason",
fill = "Fishing Effort (Per Week)",
caption = "Hypothesis: resistant fishers fish more") +
geom_text(aes(label = n),position = position_dodge(0.9), vjust = 2, size = 2, color = "gray1")+
theme_bw()
Second figure will be another stacked barplot This is rad! I’m going to code away at x18, and then do a little more interpreting.
Dataframe cleaning
x18_fishing_effort <- scaled_km_df %>%
filter(x18_fishing_high_profit %in% c(
"Once or never",
"A few times",
"A few times per month",
"1-2 per week",
"More than 1-2 times per week")) %>%
mutate(x18_fishing_high_profit = recode_factor(x18_fishing_high_profit, "Once or never" = "Rarely")) %>%
mutate(x18_fishing_high_profit = recode_factor(x18_fishing_high_profit, "A few times" = "Rarely")) %>%
drop_na(x18_fishing_high_profit)
# basic counts
x18_counts <- x18_fishing_effort %>%
count(x18_fishing_high_profit)
x18_cluster_counts <- x18_fishing_effort %>%
group_by(cluster_no) %>%
count(x18_fishing_high_profit)
Let’s do the same visualization for 18, as I did for 17.
Visualziation
ggplot(x18_cluster_counts,
aes(x = cluster_no, y = n, fill = x18_fishing_high_profit)) +
geom_bar(position="dodge", stat="identity", alpha = 0.8) +
labs( x = "Clusters (1 and 4 are 'average')",
y = "Total # of Fishers",
title = "Fishing in High Season",
fill = "Frequency of Fishing",
caption = "Hypothesis: Angry fishers fish alot") +
geom_text(aes(label = n),position = position_dodge(0.9), vjust = 2, size = 2, color = "gray1")+
theme_bw()
supportive : 719, wavering 563, Committed 414, resistant 227
Starting with 55 and 56
food_security <- scaled_km_df %>%
select(country, cluster_no, x23_job_secure, x26_fishing_income_save, x28_buyer_loans, x29_family_income, x55_worry_food, x59_food_procurement, x60_hh_fish_consumption, eng_mean, agree_mean, x54_food_availability) %>%
drop_na()
Ability to cover family costs
income_counts <- food_security %>%
group_by(cluster_no) %>%
count(x29_family_income)
ggplot(income_counts,
aes(x = cluster_no, y = n, fill = x29_family_income)) +
geom_bar(position="dodge", stat="identity", alpha = 0.8) +
labs( x = "Clusters (1 and 4 are 'average')",
y = "Total # of Fishers",
title = "Ability to cover family costs",
fill = "Household funds are..",
caption = "Hypothesis: insufficient funds = less engaged") +
geom_text(aes(label = n),position = position_dodge(0.9), vjust = 2, size = 2, color = "gray1")+
theme_bw()
Below, Food Security is asked in terms of the quality of food availability the past year, and the confidence for the upcoming year.
Measuring Question 54, “How do you rate the last year in terms of food availability?”
x54_cluster_counts <- food_security %>%
group_by(cluster_no) %>%
count(x54_food_availability) %>%
drop_na()
ggplot(x54_cluster_counts,
aes(x = cluster_no, y = n, fill = x54_food_availability)) +
geom_bar(stat="identity", alpha = 0.8) +
labs( x = "Clusters (1 and 4 are 'average')",
y = "Total # of Fishers",
title = "Food Availability (Past Year)",
fill = "'Rating' Food availability",
caption = "How do you rate the last year in terms of food availability?")
ggplot(x54_cluster_counts,
aes(x = cluster_no, y = n, fill = x54_food_availability)) +
geom_bar(position="fill", stat="identity", alpha = 0.7) +
labs( x = "Fisher Type",
y = "Percentage of fishers",
title = "Food Availability (past Year)",
fill = "Level of Food") +
scale_fill_viridis(discrete = T)
“Are you confident that you will be able to procure enough food for you and your family for the next 12 months?
x59_counts <- food_security %>%
group_by(cluster_no) %>%
count(x59_food_procurement) %>%
drop_na() %>%
mutate(x59_food_procurement = recode_factor(x59_food_procurement,
"Confident not" = "Not confident",
"Very confident not" = "Very not confident"))
ggplot(x59_counts,
aes(x = cluster_no, y = n, fill = x59_food_procurement)) +
geom_bar(stat="identity", alpha = 0.8) +
labs( x = "Clusters (1 and 4 are 'average')",
y = "Total # of Fishers",
title = "Food Security Confidence (Upcoming Year)",
fill = "'Rating' Food availability",
caption = "Are you confident that you will be able to procure enough food for you and your family for the next 12 months?") +
# geom_text(aes(label = n),position = position_dodge(0.9), vjust = 2, size = 2, color = "gray1")+
theme_bw()
x55_cluster_counts <- food_security %>%
group_by(x55_worry_food) %>%
count(cluster_no)
ggplot(x55_cluster_counts,
aes(x = cluster_no, y = n, fill = x55_worry_food)) +
geom_bar(position="fill", stat="identity", alpha = 0.7) +
labs( x = "Fisher Type",
y = "Percentage of fishers",
title = "Financial Insecurity",
color = "Cluster",
caption = "Worry about Food Security (last 12 months") +
scale_fill_viridis(discrete = T)
Starting with Enforcement
enforcement_df <- scaled_km_df %>%
select(eng_mean, agree_mean, cluster_no, x49_enforcement_responsible, x51b_fishers_reserves, country) %>%
filter(x49_enforcement_responsible %in% c("Fisheries Management Body",
"Subnational Government",
"No enforcement system",
"Myself",
"National Government", na.rm = FALSE))
### To make a grouped bar chart, I want counts for each cluster
enforcement_counts <- enforcement_df %>%
select(eng_mean, agree_mean, cluster_no, x49_enforcement_responsible, x51b_fishers_reserves, country) %>%
group_by(x49_enforcement_responsible) %>%
count(cluster_no)
swtiched_enforcement_counts <- enforcement_df %>%
group_by(cluster_no) %>%
count(x49_enforcement_responsible)
### Data cleaning
ggplot(swtiched_enforcement_counts,
aes(x = cluster_no, y = n, fill = x49_enforcement_responsible)) +
geom_bar(position="dodge", stat="identity") +
labs( x = "Cluster #",
y = "Enforcement",
title = "Enforcement By Cluster",
Fill = "Enforcement Type") +
guides(colour = guide_legend(override.aes = list(size=7)))
# scale_x_continuous(limits = c(-3, 2),
# breaks = c(-2, -1, 0, 1, 2)) +
# scale_y_continuous(limits = c(-1.5, 2),
# breaks = c( -1, 0, 1, 2)) +
ggplot(enforcement_counts,
aes(x = x49_enforcement_responsible, y = n, fill = cluster_no)) +
geom_bar(position="dodge", stat="identity", alpha = 0.8) +
labs( x = "Enforcement Responsibility",
y = "Cluster",
title = "Enforcement By Cluster",
color = "Cluster") +
geom_text(aes(label = n),position = position_dodge(0.9), vjust = 1, size = 2, color = "gray1") +
guides(colour = guide_legend(override.aes = list(size=7))) +
theme(axis.text.x = element_text(angle = 45, hjust=1))
“Who is responsible for enforcement in your community? 1. Fisheries Management Body 2. National Government 3. Subnational Government 4. Other (please state) 5. There is no enforcement system”
**For the Figures that we include in the Manuscript, we’ll need to test the significance of the different groups. We have very large Ns and feel confident in the groupings for that reason.
Chi-Squared Test Null: There is no significant difference between the Cluster makeup of each bucket of enforcement responsibility Alternative: there is a menaingful difference between the compliance behaviors of each enforcement responsoibility
enforcement_counts_table <- enforcement_counts %>%
pivot_wider(names_from = x49_enforcement_responsible, values_from = n) %>%
rename(Cluster = cluster_no)
enforcement_counts_prop <- enforcement_counts_table %>%
janitor::adorn_percentages(denominator = "col") %>%
adorn_pct_formatting(digits = 0) %>%
adorn_ns(position = "front")
enforcement_counts_prop
## Cluster Fisheries Management Body Myself National Government
## Committed 633 (30%) 22 (19%) 192 (23%)
## Resistant 276 (13%) 27 (23%) 150 (18%)
## Supportive 681 (33%) 46 (39%) 277 (34%)
## Wavering 499 (24%) 23 (19%) 199 (24%)
## No enforcement system Subnational Government
## 4 (2%) 123 (12%)
## 106 (55%) 107 (10%)
## 51 (26%) 435 (42%)
## 33 (17%) 361 (35%)
Nicer version of this table
kable(enforcement_counts_prop) %>%
kable_styling()
| Cluster | Fisheries Management Body | Myself | National Government | No enforcement system | Subnational Government |
|---|---|---|---|---|---|
| Committed | 633 (30%) | 22 (19%) | 192 (23%) | 4 (2%) | 123 (12%) |
| Resistant | 276 (13%) | 27 (23%) | 150 (18%) | 106 (55%) | 107 (10%) |
| Supportive | 681 (33%) | 46 (39%) | 277 (34%) | 51 (26%) | 435 (42%) |
| Wavering | 499 (24%) | 23 (19%) | 199 (24%) | 33 (17%) | 361 (35%) |
Now let’s run the Chi-Squared test.
enforcement_pre_chi <- enforcement_counts_table %>%
select(-Cluster)
enforcement_chi <- chisq.test(enforcement_pre_chi)
enforcement_chi
##
## Pearson's Chi-squared test
##
## data: enforcement_pre_chi
## X-squared = 431.86, df = 12, p-value < 2.2e-16
Clustered Enforcement has a p-value < 2.2e-16
perceived_catch_table <- x19_cluster_counts %>%
pivot_wider(values_from = n, names_from = x19_current_fish_catch) %>%
rename(Cluster = cluster_no)
preceived_catch_props <- perceived_catch_table %>%
janitor::adorn_percentages(denominator = "col") %>%
adorn_pct_formatting(digits = 0) %>%
adorn_ns(position = "front")
kable(preceived_catch_props) %>%
kable_styling()
| Cluster |
|
|
|
|
|
|---|---|---|---|---|---|
| Committed | 200 (23%) | 422 (23%) | 186 (16%) | 151 (41%) | 14 (52%) |
| Resistant | 187 (22%) | 350 (19%) | 115 (10%) | 70 (19%) | 1 (4%) |
| Supportive | 322 (37%) | 632 (34%) | 447 (38%) | 95 (26%) | 9 (33%) |
| Wavering | 160 (18%) | 452 (24%) | 423 (36%) | 56 (15%) | 3 (11%) |
Now let’s do the Chi-squared for Perceived Catch and Clusters
pre_chi_perceived_catch <- perceived_catch_table %>%
ungroup() %>%
select(2:6)
chi_perceived_catch <- chisq.test(pre_chi_perceived_catch)
## Warning in stats::chisq.test(x, y, ...): Chi-squared approximation may be
## incorrect
chi_perceived_catch
##
## Pearson's Chi-squared test
##
## data: pre_chi_perceived_catch
## X-squared = 242.96, df = 12, p-value < 2.2e-16
Clusters and Perceived catch have a p-value < 2.2e-16